package com.midou.administration.controller;


import com.midou.administration.entity.Role;
import com.midou.administration.service.RoleService;
import org.springframework.validation.annotation.Validated;
import org.springframework.web.bind.annotation.PathVariable;
import org.springframework.web.bind.annotation.RequestBody;
import com.midou.administration.entity.Role;
import com.midou.administration.service.impl.RoleServiceImpl;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.web.bind.annotation.RequestMapping;

import org.springframework.web.bind.annotation.RestController;

import javax.annotation.Resource;
import javax.xml.ws.RequestWrapper;

import java.util.List;

/**
 * <p>
 *  前端控制器
 * </p>
 *
 * @author MrChen
 * @since 2021-03-24
 */
@RestController
@RequestMapping("/administration/role")
public class RoleController {

    @Autowired
    private RoleServiceImpl roleService;
    @RequestMapping("/all/role")
    public List<Role> allRole(@RequestBody Integer bid){
        return roleService.allRole(bid);
    }

    @RequestMapping("/query-role")
    public Role queryRole(@RequestBody Integer id){
        return roleService.queryRole(id);
    }
    @RequestMapping("/query/role/function")
    public List<Role> queryRoleFunction(@RequestBody Integer bid){
        return roleService.queryRoleFunction(bid);
    }
}
